package com.macro.mall.portal.es.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.*;

import java.util.Date;

/**
 * @author wwj
 */
@Data
@Document(indexName = "ums_member")
@Setting(shards = 1,replicas = 0)
public class EsMember {

    @Id
    private Long id;

    @Field(type = FieldType.Text)
    private String username;

    private Integer status;

    private String levelName;

    private String birthday;
    @Field(type = FieldType.Keyword)
    private String city;

    @Field(type = FieldType.Date,format = {DateFormat.year_month_day},name = "create_time")
    private String createTime;

    @Field(type = FieldType.Text,analyzer = "genderConvertAnalyzer")
    private String gender;

    @Field(index = false)
    private String icon;

    @Field(type = FieldType.Text)
    private String job;

    private String nickname;

    @Field(index = false,name = "personalized_signature")
    private String personalizedSignature;

    @Field(type = FieldType.Text)
    private String phone;

    @Field(type = FieldType.Text,name = "source_type")
    private String sourceType;





}
